Skip to content

Emit Quent events for cudf-polars memory reservation. - #24038

Draft
TomAugspurger wants to merge 4 commits into
NVIDIA:mainfrom
TomAugspurger:tom/quent-resources+memory-reservation
Draft

Emit Quent events for cudf-polars memory reservation.#24038
TomAugspurger wants to merge 4 commits into
NVIDIA:mainfrom
TomAugspurger:tom/quent-resources+memory-reservation

Conversation

@TomAugspurger

Copy link
Copy Markdown
Contributor

Description

This updates our emitted Quent telemetry to better track memory reservations. I've added a wrapper around rapidsmpf.streaming.core.memory_reserve_or_wait.reserve_memory that includes

  • the reservation size
  • the memory tier
  • the net memory delta
  • the sequence number

Like any other Quent event, this can be tied back to an individual Operator (cudf-polars Actor).

@copy-pr-bot

copy-pr-bot Bot commented Sep 8, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions Bot added Python Affects Python cuDF API. cudf-polars Issues specific to cudf-polars labels Sep 8, 2026
Comment thread python/cudf_polars/cudf_polars/quent/_context.py Outdated
Comment thread python/cudf_polars/cudf_polars/quent/_context.py Outdated
Comment thread python/cudf_polars/cudf_polars/quent/_context.py Outdated
Comment thread python/cudf_polars/cudf_polars/quent/_context.py
Comment thread python/cudf_polars/cudf_polars/quent/_types.py Outdated
Comment thread python/cudf_polars/cudf_polars/quent/_types.py Outdated
Comment thread python/cudf_polars/cudf_polars/quent/_types.py Outdated
Comment thread python/cudf_polars/cudf_polars/quent/_types.py Outdated
@TomAugspurger TomAugspurger added non-breaking Non-breaking change improvement Improvement / enhancement to an existing function labels Sep 10, 2026
__all__ = ["MemoryReservationPurpose", "reserve_memory_traced"]


async def reserve_memory_traced(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm noticing a pattern here: we want to perform some operation using another library like kvikio or rapidsmpf and record something about its operation (using some context that only cudf-polars has, like the current operator being worked on). So I've added a wrapper that calls the underlying library and then updates the metrics.

To capture all the memory reservations, we need to ensure that every call to rapidsmpf's reserve_memory goes through our reserve_memory_traced.

@TomAugspurger

Copy link
Copy Markdown
Contributor Author

/ok to test 6feda06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cudf-polars Issues specific to cudf-polars improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant